/* 
@author maodou 
@createTimer 2024/1/17
@desc  用户相关接口
*/

import { get, post } from '@/utils/request'

//验证码接口
let codeUrl: string = '/clientApi/captcha/getCode'
//登录接口
let loginUrl: string = "/backendApi/login/doLogin"
//菜单接口
let menuUrl: string = "/backendApi/login/getRouters";

//获取验证码
export const getCode = () => {
    return get<ResType<codeType>>(codeUrl);
}

//登录接口
export const doLogin = (data: loginDataType) => {
    return post<ResType<loginType>, loginDataType>(loginUrl, data);
}

//菜单接口

export const getRoutes = () => {
    return get<ResType<menuType>>(menuUrl);
}


